package swingxrcp.framework.util;

import java.awt.Image;

import javax.swing.Icon;
import javax.swing.ImageIcon;

public class IconUtils {

	/**
	 *
	 * @param key
	 * @return
	 */
	public static Image getImage(String key) {
		return new ImageIcon(IconUtils.class.getResource(key)).getImage();
	}

	/**
	 *
	 * @param key
	 * @return
	 */
	public static Icon getIcon(String key) {
		return new ImageIcon(IconUtils.class.getResource(key));
	}

	/**
	 *
	 * @param key
	 * @return
	 */
	public static ImageIcon getImageIcon(String key) {
		return new ImageIcon(IconUtils.class.getResource(key));
	}
}
